import torch
import numpy as np
import random
import os

def setup_seed(seed):
     torch.manual_seed(seed)
     torch.cuda.manual_seed_all(seed)
     np.random.seed(seed)
     random.seed(seed)
     torch.backends.cudnn.deterministic = True

def mkdirs(path):
     d = os.path.dirname(path)
     if not os.path.exists(d):
          os.makedirs(d)
          print(f"make dirs: {d}")

if __name__ == "__main__":
     # test
     mkdirs("data/cached/l2")